package jkernel;

import java.util.Arrays;

public class StringClass {
    public static void main(String[] args) {

        int[] scores = new int[] { 88, 77, 51, 66 };
        Score s = new Score(scores);
        s.printScores();
        scores[2] = 99;
        s.printScores();

        String st = "hello";
        System.out.println(s);
        String s1 = "HELLO".toLowerCase();
        System.out.println(s1.equals(s));
        System.out.println("Hello".equalsIgnoreCase(st));
        System.out.println(st.contains("ll"));
        System.out.println("\t\rhello".trim());

        System.out.println("  ".isEmpty());
        System.out.println(st.replace("l", "m"));

        System.out.println("hello".concat(" world"));

        System.out.println(String.format("Hello %s", "world"));
        System.out.println(Boolean.parseBoolean("true"));
    }
}


class Score {
    private int [] scores;

    public Score(int[] scores) {
        this.scores = Arrays.copyOf(scores, scores.length);
    }

    public void printScores(){
        System.out.println(Arrays.toString(scores));
    }

}